home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / misc / libx11inc.lha / X11 / Xm / ListP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-13  |  3.7 KB  |  177 lines

  1. /* 
  2.  * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
  3.  * ALL RIGHTS RESERVED
  4. */ 
  5. /*   $RCSfile: ListP.h,v $ $Revision: 1.15 $ $Date: 92/05/14 12:53:10 $ */
  6. /*
  7. *  (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
  8. #ifndef _XmListP_h
  9. #define _XmListP_h
  10.  
  11. #include <Xm/List.h>
  12. #include <Xm/PrimitiveP.h>
  13. #include <Xm/ScrollBar.h>
  14. #include <Xm/ScrolledW.h>
  15.  
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19.  
  20. /*  List struct passed to Convert proc for drag and drop */
  21. typedef struct _XmListDragConvertStruct
  22. {
  23.    Widget w;
  24.    XmString * strings;
  25.    int num_strings;
  26. } XmListDragConvertStruct;
  27.  
  28. /*  List class structure  */
  29.  
  30. typedef struct _XmListClassPart
  31. {
  32.    int foo;    /*  No new fields needed  */
  33. } XmListClassPart;
  34.  
  35.  
  36. /*  Full class record declaration for List class  */
  37.  
  38. typedef struct _XmListClassRec
  39. {
  40.    CoreClassPart        core_class;
  41.    XmPrimitiveClassPart primitive_class;
  42.    XmListClassPart     list_class;
  43. } XmListClassRec;
  44.  
  45. externalref XmListClassRec xmListClassRec;
  46.  
  47. /****************
  48.  *
  49.  * Internal form of the list elements.
  50.  *
  51.  ****************/
  52.  
  53. typedef    struct {
  54.     _XmString    name;
  55.     Dimension    height;
  56.     Dimension    width;
  57.     Dimension    CumHeight;
  58.     Boolean        selected;
  59.     Boolean        last_selected;
  60.     Boolean        LastTimeDrawn;
  61.     unsigned short    NumLines;
  62.     int        length;
  63. } Element, *ElementPtr;
  64.  
  65. /*  The List instance record  */
  66.  
  67. typedef struct _XmListPart
  68. {
  69.     Dimension    spacing;
  70.     short           ItemSpacing;
  71.     Dimension       margin_width;
  72.     Dimension        margin_height;
  73.     XmFontList     font;
  74.     XmString    *items;
  75.     int        itemCount;
  76.     XmString    *selectedItems;
  77.         int             *selectedIndices;
  78.     int        selectedItemCount;
  79.     int         visibleItemCount;
  80.     int         LastSetVizCount;
  81.     unsigned char    SelectionPolicy;
  82.     unsigned char    ScrollBarDisplayPolicy;
  83.     unsigned char    SizePolicy;
  84.         XmStringDirection StrDir;
  85.  
  86.         Boolean        AutoSelect;
  87.         Boolean        DidSelection;
  88.         Boolean        FromSetSB;
  89.         Boolean        FromSetNewSize;
  90.         Boolean        AddMode;
  91.     unsigned char    LeaveDir;
  92.     unsigned char    HighlightThickness;
  93.     int         ClickInterval;
  94.         XtIntervalId    DragID;
  95.     XtCallbackList     SingleCallback;
  96.     XtCallbackList     MultipleCallback;
  97.     XtCallbackList     ExtendCallback;
  98.     XtCallbackList     BrowseCallback;
  99.     XtCallbackList     DefaultCallback;
  100.  
  101.  
  102.     GC        NormalGC;    
  103.     GC        InverseGC;
  104.     GC        HighlightGC;
  105.         Pixmap          DashTile;
  106.     ElementPtr    *InternalList;
  107.     int        LastItem;
  108.     int        FontHeight;
  109.     int        top_position;
  110.     char        Event;
  111.     int        LastHLItem;
  112.     int        StartItem;
  113.     int        OldStartItem;
  114.     int        EndItem;
  115.     int        OldEndItem;
  116.     Position    BaseX;
  117.     Position    BaseY;
  118.     Boolean        MouseMoved;
  119.     Boolean        AppendInProgress;
  120.     Boolean        Traversing;
  121.     Boolean        KbdSelection;
  122.     short        DownCount;
  123.     Time        DownTime;
  124.     int        CurrentKbdItem;
  125.     unsigned char    SelectionType;
  126.     GC        InsensitiveGC;
  127.  
  128.     int vmin;          /*  slider minimum coordiate position     */
  129.     int vmax;          /*  slider maximum coordiate position     */
  130.     int vOrigin;          /*  slider edge location                  */
  131.     int vExtent;          /*  slider size                           */
  132.  
  133.     int hmin;          /*  Same as above for horizontal bar.     */
  134.     int hmax;
  135.     int hOrigin;
  136.     int hExtent;
  137.  
  138.     Dimension    MaxWidth;
  139.     Dimension    CharWidth;
  140.     Position    XOrigin;
  141.     
  142.     XmScrollBarWidget       hScrollBar;
  143.     XmScrollBarWidget       vScrollBar;
  144.     XmScrolledWindowWidget  Mom;
  145.     Dimension    MaxItemHeight;
  146.     
  147. } XmListPart;
  148.  
  149.  
  150. /*  Full instance record declaration  */
  151.  
  152. typedef struct _XmListRec
  153. {
  154.    CorePart       core;
  155.    XmPrimitivePart primitive;
  156.    XmListPart       list;
  157. } XmListRec;
  158.  
  159.  
  160. /********    Private Function Declarations    ********/
  161. #ifdef _NO_PROTO
  162.  
  163.  
  164. #else
  165.  
  166.  
  167. #endif /* _NO_PROTO */
  168. /********    End Private Function Declarations    ********/
  169.  
  170.  
  171. #ifdef __cplusplus
  172. }  /* Close scope of 'extern "C"' declaration which encloses file. */
  173. #endif
  174.  
  175. #endif /* _XmListP_h */
  176. /* DON'T ADD ANYTHING AFTER THIS #endif */
  177.